<%
## Tangent, an online sign-up sheet
## Copyright (C) 2008 Justin Ludwig and Adam Stuenkel
## 
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or (at your option) any later version.
## 
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
## 
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301, USA.
-%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  <title><% if @page_title %><%=h @page_title %> - <% end %>Tangent</title>
  <%= yui_stylesheet_link_tag %> 
  <%= stylesheet_link_tag :all, :cache => true, :media => 'all' %> 
  <%= yui_javascript_include_tag %>
  <%= javascript_include_tag :all, :cache => true %> 
  <script type="text/javascript">
  	App.authenticity_token = "<%= form_authenticity_token -%>";
  	App.init();
  </script>
</head>
<body class="yui-skin-sam">
<div id="doc3" class="yui-t7">

<div id="hd" class="lr-container">

<span class="l">
    <%= link_to "Tangent", "/" %>
<% if logged_in? %>
    &nbsp;|&nbsp;
    <%= link_to_unless_current "My Stuff", my_stuff_path %>
    &nbsp;|&nbsp;
    <%= link_to_unless_current "My Profile", person_path(current_person) %>
<% end %>
</span>
<span class="r">
<% if logged_in? %>
    <%=h current_person.display_name %>
    &nbsp;|&nbsp;
    <%= link_to "Logout", session_path, :method => "delete" %>
<% else %>
    <%= link_to_unless_current "Register", new_person_path %>
    &nbsp;|&nbsp;
    <%= link_to_unless_current "Login", new_session_path %>
<% end %>
</span>

</div>
<div id="bd">
<div id="flash" class="yui-g">

<% if flash[:notice] %>
  <p class="notice"><%= flash[:notice] %></p>
<% end %>
    
<% if flash[:error] %>
  <p class="error"><%= flash[:error] %></p>
<% end %>

</div>
<div id="body" class="yui-g">

<%= yield  %>

</div>
</div>
<div id="ft">
</div>

</div>
<div id="bottom">
    <%= link_to_unless_current "About", "/about" %>
    &nbsp;|&nbsp;
    <%= link_to_unless_current "Privacy Policy", "/privacy" %>
    &nbsp;|&nbsp;
    <%= link_to_unless_current "Feedback", "/feedback" %>
</div>
</body>
</html>
